package edu.tec.mty.test.ivan.playModes;

import edu.tec.mty.core.modules.models.BallModel;
import edu.tec.mty.core.modules.models.Position;
import edu.tec.mty.core.modules.models.WorldModel;
import edu.tec.mty.playModes.PlayMode;
import edu.tec.mty.players.PlayerActions;

public class BeforeKickOff implements PlayMode {

	private boolean isPlaced = false;
	
	public BeforeKickOff() {
		
	}
	
	@Override
	public void perform(PlayerActions player, BallModel ballModel, WorldModel worldModel) {
		if (!this.isPlaced) {
			switch (player.getNumber()) {
			case 1:
				player.setup(new Position(-10.0, 0.0));
				break;
			case 2:
				player.setup(new Position(-7.0, -7.0));
				break;
			case 3:
				player.setup(new Position(-7.0, 7.0));
				break;
			case 4:
				player.setup(new Position(-1.0, -9.0));
				break;
			case 5:
				player.setup(new Position(-1.0, 9.0));
				break;
			default:
				break;
			}
			this.isPlaced = true;
		} else {
			
		}
	}

	@Override
	public void perform(BallModel ballModel, WorldModel worldModel) {
		
	}

}
